home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1989 Special Issue
/
rerun-1989-special-issue.d64
/
spr lib.doc
< prev
next >
Wrap
Text File
|
2022-09-20
|
8KB
|
148 lines
Sprite Library 128
By Bruce Jaeger
Sprite Library 128 (SL 128) is a powerful utility program for the
C-128 that enables you to build and save a "library" of sprites and to add,
delete, manipulate and save sprites in many ways. In addition to the program,
this disk includes a starter library of sprites I designed, as well as some
from public domain sources.
I suggest that you copy the program to an empty formatted disk, so that
it and all your sprite files can be in one place. To use SL 128, make sure
your computer is in 40-column mode, then type RUN. The screen will blank
briefly as the program goes into Fast mode to poke in the two machine language
routines, and then you'll be asked for the name of a library file to load.
Press the return key to use the default library, SPR/LIB. You can also press
F3 to view the directory of the current disk. When you're first using SL 128,
you won't have a library to load yet, but press the return key anyway. The
program will tell you that "SPR/LIB is not on disk," and ask if you're starting
a new library. Press Y and you'll proceed to the main menu.
The Main Menu
The main menu screen shows the name of the library you're working with
and the number of sprites in that library, followed by a list of commands:
A Add sprites from a disk
V View/select sprites from the library
S Use SPRDEF to add to the library
D Save selected sprites to disk
U Unselect all sprites
Q Quit
Pressing A lets you add sprites to the current library from
previously-created disk files. (See "Tips on Adding Sprites," below.) The
sprites are added to the end of the library currently in memory.
S sends you to SPRDEF, the C-128's built-in sprite editing program. You
can then create sprites to add to the library and even edit sprites already
there. You needn't create all eight sprites the C-128 can handle; when you
leave SPRDEF (by pressing the return key), you'll automatically return to SL
128, which will ask which of the new sprites you want to keep.
U "unselects" sprites that you've marked for saving or elimination. (More
on that later.)
Q quits SL 128. If you've added to or modified the library, the library
file will be updated before the program stops. (Any time you're using the
default SPR/LIB, the program saves the newer version as SPR/LIB and renames the
previous version, still on disk, as BACKUP SPR/LIB.)
V lets you view the sprites in the library and manipulate them in several
ways. SL 128 displays 50 sprites (a page) on the screen at once. After you
press V, a message appears telling you how many sprites are in the library and
asking where you'd like the block of 50 to start. If there are less than 50 in
the library, this message is skipped and the display starts at number 1. Either
way, when the sprites are displayed on the screen, each has a number in reverse
field beneath it. Also, another list of SL 128 commands appears at the bottom
of the screen. These, not necessarily in order, are:
P Previous page
N Next page
R Range
S Select/unselect sprites
K Kill/unkill sprites
X Exchange sprites
B Buffer sprites
Return to menu
Press P to display the 50 sprites on the previous page. If you're looking
at the first page in the library, the command "wraps around" backwards and
displays the last page.
Press N to display the next page. If you're looking at the last page in
the library, the display wraps around to show you the first page.
R returns you to the message telling how many sprites there are in the
library and asking where you'd like the display to begin. Note that you don't
have to pick even multiples of 50; you can start with sprite number 12, or
whatever.
S lets you select or unselect a sprite or range of sprites to save on disk
later. After you press S, you'll be asked for the sprite number, meaning the
number beneath the sprite displayed. To choose a range of sprites, when the
program asks for sprite number, type the number of the first one you want, a
dash and the number of the last one you want. For example, to select sprites 5
through 12, type 5-12. When you choose a sprite, its color changes from gray to
yellow to remind you that it's been selected. Choose it again, and it will be
unselected and the color will revert to gray.
Press K to kill (eliminate) a sprite or range of sprites from the library.
Killed sprites turn red to remind you that they'll be eliminated when the
library is resaved to disk. If you change your mind, press K and the sprite
number again.
Remember the Unselect command in the main menu? It's a handy way to
unselect and unkill sprites should you get your selections confused, It lets
you start over again, with everything unselected.
Press X to exchange the positions of two sprites in the library. You'll
be asked for two sprite numbers, neither of which has to be on display at the
time. These two sprites will then swap positions. This command is useful for
moving sprites around inside a fairly small group; for moving a lot of sprites
around, the Buffer command is easier.
Press B to place up to 50 sprites in the buffer for moving to another spot
in the library. Here again, you can enter either one sprite number or a range.
This command is handy for placing related sprites together.
After you've placed sprites in the buffer, the program asks where you want
to move them. If you happen to know the number of the sprite following which
you want to insert the buffered sprites, enter that number. Otherwise, press
return and go back to viewing sprites, so you can find a good spot.
If you have sprites in the buffer and return to viewing the library, the
"B...Buffer sprites" command disappears from the display and is replaced by two
new commands: "I...Insert sprites" and "C...Clear buffer." Press I to insert
the sprites in the buffer back into the library or C to clear the buffer, if
you've decided that you made a bad choice.
Press M (for menu) or the return key to leave the library display and
return to the main menu.
Note that two commands, + and -, are not included in this list of
commands, because there's no room on the screen. Press the + key to move the
range of 50 displayed sprites upward by one, and press the - key to move the
range down by one.
Tips on Adding Sprites
Here are some tips on using SL 128 to start your own collection of
sprites:
You may already have saved some sprites that you designed with the C-128's
SPRDEF program or with other sprite editors. These can be loaded directly by SL
128 by pressing A (for Add) at the main menu. The sprites will be added at the
end of the sprites currently in memory.
If you have a program that contains sprites defined by Data statements,
it's easy to prepare them for use with SL 128:
1. Load the program into the C-128, in 128 mode.
2. Delete all of the program except the sprite Data statements and the
line that reads the data and pokes it into memory.
3. If necessary, change the Poke addresses to those of the C-128; sprite
1 starts at address 3584 ($0E00).
4. It's a good idea to save this abbreviated program to disk, just in
case.
5. Run the abbreviated program to poke the data into sprite memory.
6. Use SPRDEF to make sure things are are all right and to modify the
sprites if desired. Sometimes sprites after the first one are recognizable, but
a little off. This is because a sprite is defined in 63 bytes, leaving one
unused byte to separate it from the next sprite in memory. Most programmers
place a dummy value in their Data statements for this extra byte.
7. When you're satisfied, save the sprites to disk with the following
command in Direct mode: BSAVE "FILENAME",B0,P3584 TO P4095. The filename, of
course, can be any name you care to use. Note that this command saves all eight
sprites, but if you want to save fewer, don't worry; SL 128 will let you
specify which ones you want to keep.
SL 128 can read any sprites saved in the above manner. It can also read
sprites saved from the different addresses used by the C-64. All that matters
is that they're saved in program-type f